<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/list.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/header.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/content.css"/>
		<script src="./Public/home/js/jquery-1.7.2.min.js"></script>
		<script src="./Public/home/js/style.js"></script>
		<script src="./Public/home/js/area.js"></script>
		<!--上传插件-->
		 <script src="./Public/uploadify/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
	    <script src="./Public/uploadify/jquery.uploadify.min.js" type="text/javascript" charset="utf-8"></script>
	    <link rel="stylesheet" type="text/css" href="./Public/uploadify/uploadify.css"/>
	</head>
	<body>
	<div id="edit-password"></div>
	<div class="edit-box">
		<div class="edit-box-title">修改密码<span class="del">x</span></div>
		<div class="edit-box-content">
			<form action="http://localhost/360shop/index.php?m=Home&c=Member&a=edit" method="post">
				<span>旧 密 码：</span><input type="password" name="oldpassword" placeholder="请输入旧密码" /><br />
				<span> 密 码：</span><input type="password" name="password" placeholder="请输入新密码" /><br />
				<span>确认密码：</span><input type="password" name="repassword" placeholder="请确认新密码"/><br />	
				<span>验证码：</span><input type="text" name="code" placeholder="请输入验证码" style="width: 160px;"/><img src="http://localhost/360shop/index.php?m=Home&c=Member&a=code" style="position: relative;top:10px;margin-left: 5px;"/>
				<input type="hidden" name="uid" value="1" />
				<input type="submit" value="提交" class="edit-box-btn"/>
			</form>
		</div>
	</div>
	<!--header-->
	<div id="header">
		<div class="header"> 
			<div class="headerTop">
				<div class="headerLeft">
					<h1>
						<a href="http://localhost/360shop/index.php?m=Home&c=Index&a=index"><img src="./Public/home/images/logo1_cc09ff8.png"/></a>
					</h1>
				</div>
				<div class="headerRight">
					<ul class="header-car">
						<li class="shop-car">
							<a href="http://localhost/360shop/index.php?m=Home&c=Cart&a=index" class="cart-add">购物车(<span>0
               </span>)</a>
							<!--<div class="car-box">
																<div class="shop-car-empty">购物车中还没有商品,赶紧选购吧!</div>
								
               							</div>-->
						</li>
					</ul>
					<div class="select">
						<form action="" method="get">
							<input type="text" class="select-box" />
							<input type="submit" value="360手机" class="select-btn"/>
						</form>
					</div>
					<ul class="navbar">
						<li><a href="http://localhost/360shop/index.php?m=Home&c=Index&a=index" >首页</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=1">手机</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=14">耳机</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=13">能源</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=20">智能硬件</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=18">VR眼镜/车载设备</a></li>
												<li><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=19">存储</a></li>
											</ul>
				</div>
			</div>
			<div class="header-bottom">
				<div class="header-bottom-box">
					<div class="bottom-left-hover">
						<div class="header-bottom-left">全部商品分类</div>
						<ul class="nav-list">
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=1" class="nav-list-title">手机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=21">智能机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=22">商务机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=24">双卡双待</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=14" class="nav-list-title">耳机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=25">有线耳机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=26">蓝牙耳机</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=27">运动耳机</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=13" class="nav-list-title">能源</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=28">电池</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=29">移动电源</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=20" class="nav-list-title">智能硬件</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=43">智能手表</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=30">智能路由器</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=31">随身WIFI</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=18" class="nav-list-title">VR眼镜/车载设备</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=32">VR眼镜</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=33">车载设备</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=19" class="nav-list-title">存储</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=34">内存卡</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=35">U盘</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=36">移动硬盘</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=17" class="nav-list-title">保护</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=39">保护套</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=40">后壳</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=41">贴膜</a>
															</li>
													<li>
								<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=15" class="nav-list-title">手机配件</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=37">充电器</a>
																<a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=38">数据线</a>
															</li>
											</ul>
					</div>
					<ul class="header-bottom-right">
						<li class="li-nav">
							<span style="padiving-left: 15px;">网站导航</span>
							<div class="all-list">
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=1">手机</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=14">耳机</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=13">能源</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=20">智能硬件</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=18">VR眼镜/车载设备</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=19">存储</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=17">保护</a></div>
																<div><a href="http://localhost/360shop/index.php?m=Home&c=List&a=index&cid=15">手机配件</a></div>
															</div>
						</li>
						                
						<li>
							<a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=index">CRBHF</a>
							<a href="http://localhost/360shop/index.php?m=Home&c=Member&a=del">退出登录</a>
							
						</li>
												<li class="order"><a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=order">我的订单</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!--/header-->
	<!--/header-->
	<div id="row">
		<!--left-->
		<div id="presonal">
	<div class="presonal">个人中心</div>
	<div class="presonal-list">
		<p class="presonal-list-title">订单中心</p>
		<ul>
			<li><a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=index">我的首页</a></li>
			<li><a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=order">我的订单</a></li>
		<p class="presonal-list-title">账户中心</p>
			<li><a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=presonal">修改个人信息</a></li>
			<li><a href="http://localhost/360shop/index.php?m=Home&c=Presonal&a=address">收货地址</a></li>
			<li class="presonal-list-edit"><a href="javascript:;">修改密码</a></li>
		</ul>
	</div>
</div>
		<!--/left-->
		<!--right-->
		<div id="presonal-right">
			<h3 class="order-title">我的收货地址</h3>
			<div class="address-box">
				<?php if($addressData){?>
                
				<?php foreach ($addressData as $a){?>
				<div class="address-con">
					<dt>姓名：<?php echo $a['name']?></dt>
					<dd>
						<p>电话：<?php echo $a['phone']?></p>
						<p>地址：<?php echo $a['address']?></p>
						<p>邮编：<?php echo $a['postcode']?></p>
					</dd>
					<p class="address-btn">
						<a uaid="<?php echo $a['uaid']?>" class="address-edit">编辑</a>
						<a href="javascript:if(confirm('确定删除吗？')) location.href='<?php echo U('del',array('uaid'=>$a['uaid']))?>';" class="address-del">删除</a>
					</p>
				</div>
				<?php }?>
				
               <?php }?>
				<div class="address-add">添加新地址</div>
			</div>
		</div>
		<script type="text/javascript">
		$(function(){	
			//初始化方法
			area.init('a');
			//添加新地址
			$('.address-add').click(function(){
				$('#overlay').css({display:'block'});
				$('.add-address').css({display:'block'});
			});
			//关闭、取消
			$('.address-header .address-hidden').click(function(){
				$('#overlay').css({display:'none'});
				$('.address').css({display:'none'});
			});
			$('.address-button span').click(function(){
				$('#overlay').css({display:'none'});
				$('.address').css({display:'none'});
			});
			//编辑收货地址
			$('.address-edit').click(function(){
				$('#overlay').css({display:'block'});
				$('.edit-address').css({display:'block'});
				var uaid=$(this).attr('uaid');
				$.ajax({
					type:"post",
					url:"<?php echo U('Presonal/editAddress')?>",
					data:{uaid:uaid},
					dataType:'json',
					success:function(phpData){
						$('.edit-address .address-name').attr('value',phpData.name);
						$('.edit-address .address-phone').attr('value',phpData.phone);
						$('.edit-address .address-name').attr('value',phpData.name);
						$('.edit-address .xx').attr('value',phpData.xx);
						$('.edit-address .postcode').attr('value',phpData.postcode);
						$('.edit-address .uaid').attr('value',phpData.uaid);
						//初始化方法
						area.init('b');
						//修改的时候默认被选中效果
						 area.selected(phpData.sheng,phpData.shi,phpData.xian);
					}
				});
			
			});
			
		})
		</script>
		<div id="overlay"></div>
		<!--添加-->
		<div class="address add-address">
			<form action="<?php echo U('Presonal/address')?>" method="post">
				<div class="address-header">
					<span>添加收货地址</span>
					<span class="address-hidden">X</span>
				</div>
				<span style="color:red;padding-left:25px;font-size:12px;">注：*标注的为必填项</span>
				<div class="address-tab">
					<p><span class="color">*</span><span>收货人姓名：</span><input type="text" name="name" value=""/></p>
					<p><span class="color">*</span><span>收货人地址：</span>
						<select name="address[]" id="a1">
							
						</select>
						<select name="address[]" id="a2">
							
						</select>
						<select name="address[]" id="a3">
							
						</select>
						<input type="text" name="address[]" value=""/> 
					</p>
					<p><span class="color">*</span><span>手机号码：</span><input type="text" name="phone" value=""/> </p>
					<p><span class="e-span">邮编：</span><input type="text" name="postcode" value=""/></p>
					<input type="hidden" name="shop_user_uid"  value="<?php echo $_SESSION['nickuser']['uid']?>" />
				</div>
				<div class="address-button">
					<input type="submit" value="提交"/><span>取消</span>
				</div>
			</form>
		</div>
		<!--编辑-->
		<div class="address edit-address">
			<form action="<?php echo U('Presonal/edit')?>" method="post">
				<div class="address-header">
					<span>编辑收货地址</span>
					<span class="address-hidden">X</span>
				</div>
				<span style="color:red;padding-left:25px;font-size:12px;">注：*标注的为必填项</span>
				<div class="address-tab">
					<p><span class="color">*</span><span>收货人姓名：</span><input type="text" name="name" class="address-name" value=""/></p>
					<p><span class="color">*</span><span>收货人地址：</span>
						<select name="address[]" id="b1">
							
						</select>
						<select name="address[]" id="b2">
							
						</select>
						<select name="address[]" id="b3">
							
						</select>
						<input type="text" name="address[]" class="xx" value=""/> 
					</p>
					<p><span class="color">*</span><span>手机号码：</span><input type="text" name="phone" class="address-phone" value=""/> </p>
					<p><span class="e-span">邮编：</span><input type="text" name="postcode" class="postcode" value=""/></p>
					<input type="hidden" name="uaid" class="uaid" value="" />
				</div>
				<div class="address-button">
					<input type="submit" value="提交"/><span>取消</span>
				</div>
			</form>
		</div>
		<!--/right-->
	</div>
	<!--footer-->
	<div id="footer">
	<div class="footer">
		<p>法律声明|备案证号：京ICP备11014623号-6    © 版权2012-2020 奇酷互联网络科技(深圳)有限公司</p>
	</div>
</div>
	<!--/footer-->
	</body>
</html>
